<!DOCTYPE html>
<%@ include file="../base.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link href="images/favicon.ico" mce_href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <title>我的会员卡</title>
    <%@ include file="../js.jsp"%>
</head>
<body ontouchstart>
     <div class="page pad-20 margin-b-50">
         <div class="bd">
         	<c:forEach var="bean" items="${list }">
             <div class="gas-card-container gas-bg-3 margin-t-20">
                 <div class="gas-card" onclick="show_detail(this,${bean.HQId},'${bean.HQName}',${bean.stationId})">
                     <div class="gas-station-name">
                      	<p>${bean.HQName }</p>
                      	<p>${bean.phoneNum }</p>
                     </div>
                     <h1 class="text-center pad-20">
                     	会员卡
                     </h1>
                     <div class="gas-card-detail">
                         <div>
                             <p>余额：<b>${bean.amount }元</b></p>
                         </div>
                         <div>
                             <p>积分：<b>${bean.point}</b></p>
                         </div>
                     </div>
                     <%-- <div class="gas-card-detail">
                         <div>
                             <p><a href="${ctx}/pay/toPay?hqId=${bean.HQId}&memberId=${bean.memberId}"><p>充值</p></a></p>
                         </div>
                         <div>
                             <p></p>
                         </div>
                     </div> --%>
                 </div>
                 <%-- <div class="gas-card-detail">
                     <div>
                         <a href="${ctx}/pay/toPay?hqId=${bean.HQId}&memberId=${bean.memberId}"><p>充值</p></a>
                     </div>
                 </div> --%>
             </div>
              <div class="weui_btn_area text-center">
                 	<c:if test="${bean.chargeStatus == 1}">
	                    <a class="weui_btn weui_btn_inline weui_btn_primary" 
	                    href="${ctx}/pay/toCharge?hqId=${bean.HQId}&memberId=${bean.memberId}">充值</a>
                    </c:if>
	                    <a class="weui_btn weui_btn_inline weui_btn_primary"
	                    href="${ctx}/member/toDetail?hqId=${bean.HQId}&memberId=${bean.memberId}&hqName=${bean.HQName}">收支明细</a>
               	</div>
               	<br />
			</c:forEach>
         </div>
     </div>
     <%@ include file="../bottom.jsp"%>
     
     <form id="show_detail_form" action="${ctx}/member/toshare" method="get">
     	<input type="hidden" name="hqId" id="hqId" />
     	<input type="hidden" name="hqName" id="hqName" />
     	<input type="hidden" name="stationId" id="stationId" />
     </form>
</body>
 <script type="text/javascript">
	function show_detail(doc,hqId,hqName,stationId){
		$("#show_detail_form").find("#hqId").val(hqId);
		$("#show_detail_form").find("#hqName").val(hqName);
		$("#show_detail_form").find("#stationId").val(stationId);
		$("#show_detail_form").submit();
	}
</script>
</html>